<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path_part = request.getContextPath();
	String basePathter = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path_part + "/";
%>
<div class="wbs_scroll" style="height:23px;">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview">
		<thead>
             <tr class="title">
                 <td >序号</td>
                 <td >组织名称</td>
                 <td >组织类型</td>
                 <td >组织备注</td>
                 <td >创建时间</td>
                 <td >操作</td>
             </tr>
       	</thead>
	</table>
</div>
<div class="wbs_scroll" style="height:396px;" >
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview" id="sale_saleChance_table">
		<tbody class="mytbody">
                	<s:if test="departmentList.size()==0">
	               		<tr>
	               			<td colspan="2" align="center">无记录</td>
	               		</tr>
	               	</s:if>
	               	<s:else>
		                <s:iterator value="departmentList" status="stat">
			                <tr>
			                    <td style="width:80px"><s:property value="#stat.count"/></td>
			                    <td style="padding-left: <s:property value="paddingLeft"/>px;">
			                    	<s:if test="!leaf">
										<img src="<%=basePathter %>/common/img/grid_img/minus3.gif">
									</s:if>
									<s:else>
										<img src="<%=basePathter %>/common/img/icon/page_gear.gif">
									</s:else>
									<s:property value="name"/>
			                    </td>
			                    <td>
									<s:if test="type=='department'">
										部门
									</s:if>
									<s:elseif test="type=='ccompany'">
										子公司
									</s:elseif>
									<s:elseif test="type=='group'">
										集团
									</s:elseif>
								</td> 
			                    <td ><s:property value="memo"/></td>
			                    <td ><s:property value="createDate"/></td>
			                    <td>
			                    	<a class="icon_tools menu_arrow_down" href="javascript:void(0);" onClick="openmenu(this , 'gotoDepartmentMenu.action?departmentVo.id=${id}&departmentVo.type=${type}');">▼</a>
			                    </td>
			                </tr>
		                </s:iterator>
               	</s:else>
          </tbody>
	</table>
<%@include file="../../../common/jsp/pageing.jsp" %>
</div>
<script>
	// 文本超过8个字符数时，用省略显示
		text_overflow( 10 );
	 	//查询方法
		function searchLeaveBySearchKey(){
			var name = document.getElementById("condition.beginDate").value;
			loadContent('_econTargetList_div_id','leaveAction!findAllLeave.action?condition.beginDate='+name , function(){
			setGridCss();
			})
		}
        // 分页
		function gotoPage( pageNo , totalPage , pageSize ){
			// 按page的信息加载数据
			// 如果当前页大于了最大页数就弹出警告
			if( pageNo > totalPage ){
				window.alert( '总页数为'+totalPage+' , 请重新输入页码!' );
				return;
			}
			// 加载数据
			loadContent( '_econTargetList_div_id' , 'leaveAction!listLeaveByPage.action?page.pageNo='+pageNo+'&page.totalPage='+totalPage+'&page.pageSize='+pageSize+'&condition.beginDate=<s:property value="condition.beginDate"/>',function() {setGridCss();setGridOddEvenCss();} );
		}
</script>